package com.chub.study.modules.entity;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 地址信息表
 * </p>
 *
 * @author Chub
 * @since 2023-06-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_addr_info")
@ApiModel(value="TAddrInfo", description="地址信息表")
public class TAddrInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "地址标识")
    @TableId(value = "ADDR_ID")
    private String addrId;

    @ApiModelProperty(value = "省代码")
    @TableField("PROV_CODE")
    private String provCode;

    @ApiModelProperty(value = "市代码")
    @TableField("CITY_CODE")
    private String cityCode;

    @ApiModelProperty(value = "县代码")
    @TableField("CNTY_CODE")
    private String cntyCode;

    @ApiModelProperty(value = "详细地址")
    @TableField("DTL_ADDR")
    private String dtlAddr;

    @ApiModelProperty(value = "生效状态,参见字典:EFF_STAT")
    @TableField("EFF_STAT")
    private String effStat;

    @ApiModelProperty(value = "创建用户")
    @TableField("CRT_USER_CODE")
    private String crtUserCode;

    @ApiModelProperty(value = "创建时间戳, ISO19")
    @TableField(value = "CRT_DT")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    private LocalDateTime crtDt;

    @ApiModelProperty(value = "修改用户")
    @TableField("MOD_USER_CODE")
    private String modUserCode;

    // select = false 将不查询该字段
    @ApiModelProperty(value = "修改时间戳")
    @TableField(value = "MOD_DT", select = false)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    private LocalDateTime modDt;

}
